package com.booksystem.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * <p>
 *   添加购物车请求参数对象
 * </p>
 * @author 段伟豪
 */
@Data
@ApiModel(description = "添加购物车请求参数")
public class AddToCartDTO {

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空")
    @ApiModelProperty(value = "用户ID", example = "1")
    private Long userId;

    /**
     * 商品ID
     */
    @NotNull(message = "商品ID不能为空")
    @ApiModelProperty(value = "商品ID", example = "1001")
    private Long productId;

    /**
     * 商品数量
     */
    @NotNull(message = "商品数量不能为空")
    @ApiModelProperty(value = "商品数量", example = "2")
    private Integer quantity;
}